package org.example.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class ArticleAddParam {
    @NotBlank(message = "内容不能为空!!!")
    @Length(min = 20,message = "内容最少为20个字符!!!")
    private String content;
    @NotBlank(message = "摘要不能为空!!!")
    @Length(min = 12,message = "摘要最少为12个字符!!!")
    private String summary;
    @NotBlank(message = "标题不能为空!!!")
    private String title;
    @NotNull(message = "请选择一个类别!!!")
    private Long categoryId;
    @NotEmpty(message = "请选择标签!!!")
    private List<Long> tagIds;


}
